package org.qee.mq.custom;

import lombok.Data;

import java.io.IOException;
import java.util.List;

public interface Queue {

    @Data
    class TakeResult {
        List<byte[]> result;
        long lastOffset;
    }

    boolean offer(Message message);

    TakeResult take(long offset, int size) throws IOException;

    void reload();
}
